import request from "@/utils/request";

export const loginService = params => {
    return request({
      url: '/accounts/login',
      method: 'get',
      params
    })
} 


export const getAdminDetail = params => {
  return request({
    url: '/accounts/accountDetail',  
    params
  })
} 

export const password = data => {
  return request({
    url: '/sys/admin/password',
    method: 'POST',
    data
  })
} 


export const adminDelete = params => {
  return request({
    url: '/accounts/accountDelete',
    params
  })
} 


export const getUserInfoApi = params => {
    return request({
      url: '/accounts/getMenus', 
params
    })
} 


export const getAdminList = params => {
  return request({
    url: '/accounts/pageList',  
    params
  })
} 


export const editInfo = data => {
  return request({
    url: '/accounts/accountUpdate',
    method: 'POST',
    data
  })
} 
export const adminEdit = data => {
  return request({
    url: '/accounts/accountUpdate',
    method: 'POST',
    data
  })
} 
export const adminEditStatus = data => {
  return request({
    url: '/sys/admin/editstatus',
    method: 'POST',
    data
  })
} 
export const adminAdd = data => {
  return request({
    url: '/accounts/accountUpdate',
    method: 'POST',
    data
  })
} 

export const getLoginLog = params => {
  return request({
    url: '/sys/admin/loginlog', 
    params
  })
} 


export const getOperLog = params => {
  return request({
    url: '/sys/admin/operlog', 
    params
  })
} 